package cn.gyouzhe.mapper;

import cn.gyouzhe.entity.FeedBack;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 意见返回mapper
 *
 * @author wangchuan
 * @datetime 2018/3/30 0:23
 */
public interface FeedbackMapper {
    /**
     * 保存意见反馈
     * @param feedBack 意见
     */
    @Insert("insert into g_feedback(contact,content,created) values(#{contact},#{content},now())")
    void saveFeedback(FeedBack feedBack);


    /**
     * 意见已读
     * @param feedbackId  意见ID
     */
    @Update("update g_feedback set is_read=1 where id=#{feedbackId}")
    void readFeedback(@Param("feedbackId") int feedbackId);
}
